#ifndef _CONNECTION_H_
#define _CONNECTION_H_
//#ifdef	_win32
//	typedef int ssize_T
//#endif

#include "../Api Headers/IConnection.hpp"

#if !defined( __ssize_t_defined )
typedef long int        ssize_t;
#endif

namespace zia {

	class Connection : public api::IConnection
	{
	public:
	    Connection();
	    virtual ~Connection();

	    virtual void                close();
	    virtual void                setFdReadCallback(api::FdCallback callback/* = api::FdCallback()*/);
	    virtual void                setFdWriteCallback(api::FdCallback callback/* = api::FdCallback()*/);
		void						StockCliInfo(int socket, unsigned int ip);
	  ::ssize_t			SendToCli(api::Resource res, void *buf, size_t);
	  ::ssize_t			RecvFromCli(api::Resource res, void *buf, size_t);
		api::FdCallback				getSendCB();
	private:
		api::FdCallback sendCB;
		api::FdCallback recvCB;
	};
}

#endif
